/**
 * Created by Administrator on 2016/10/25.
 */

var RichTextController = jGame.ControllerObject.extend({

    _text: null,
    _richText: null,

    onViewEnter: function (view) {
        this._super(view);
        this._richText = jGame.findView(view, "RichText");
        this._text = "hello";
        this.updateRichText();
    },

    updateRichText: function () {
        var view = this.getView();
        if(view) {
            // var i = 0
            // for(; i < 10; i++) {
            //     if(i%4==0) {
            //         var element = new jGame.RichElementText(i, cc.color.WHITE, 255, "\n", "Helvetica", 10);
            //         this._richText.pushBackElement(element);
            //     }else {
            //         var element = new jGame.RichElementText(i, cc.color.RED, 255, this._text + "_" + i, "Helvetica", 48);
            //         this._richText.pushBackElement(element);
            //     }
            // }
            //
            // this._richText.width = 2000;
            // //this._richText.setAnchorPoint(cc.p(0, 1));
            // this._richText.ignoreContentAdaptWithSize(false);
            // this._richText.setContentSize(this._richText.getRendererSize());
        }
    },

});